<%@ taglib uri="http://www.springframework.org/security/tags" prefix="sec" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>

<body>
<sec:authorize access="!isAuthenticated()">
	<h1>Login</h1>
	<div id="login-error">${error}</div>
	<form action="${pageContext.request.contextPath}/doLogin" method="post" >
		<p>
		<label for="j_username">Username</label>
		<input id="j_username" name="j_username" type="text" />
		</p>
		
		<p>
		<label for="j_password">Password</label>
		<input id="j_password" name="j_password" type="password" />
		</p>
		
		<input  type="submit" value="Login"/>       
	</form>
</sec:authorize>

<sec:authorize access="isAuthenticated()">
	<h1><a href="${pageContext.request.contextPath}/logout">Logout</a></h1>
</sec:authorize>

</body>
</html>